3.160 \(\int \frac{\sec ^5(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx\)

Optimal. Leaf size=52 \[ \frac{\tan ^3(c+d x)}{3 a d}+\frac{\tan (c+d x)}{a d}-\frac{i \sec ^4(c+d x)}{4 a d} \]

[Out]

((-I/4)*Sec[c + d*x]^4)/(a*d) + Tan[c + d*x]/(a*d) + Tan[c + d*x]^3/(3*a*d)

________________________________________________________________________________________

Rubi [A]  time = 0.115584, antiderivative size = 52, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 31, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.161, Rules used = {3092, 3090, 3767, 2606, 30} \[ \frac{\tan ^3(c+d x)}{3 a d}+\frac{\tan (c+d x)}{a d}-\frac{i \sec ^4(c+d x)}{4 a d} \]

Antiderivative was successfully verified.

[In]

Int[Sec[c + d*x]^5/(a*Cos[c + d*x] + I*a*Sin[c + d*x]),x]

[Out]

((-I/4)*Sec[c + d*x]^4)/(a*d) + Tan[c + d*x]/(a*d) + Tan[c + d*x]^3/(3*a*d)

Rule 3092

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_), x_Symb
ol] :> Dist[a^n*b^n, Int[Cos[c + d*x]^m/(b*Cos[c + d*x] + a*Sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d, m},
x] && EqQ[a^2 + b^2, 0] && ILtQ[n, 0]

Rule 3090

Int[cos[(c_.) + (d_.)*(x_)]^(m_.)*(cos[(c_.) + (d_.)*(x_)]*(a_.) + (b_.)*sin[(c_.) + (d_.)*(x_)])^(n_.), x_Sym
bol] :> Int[ExpandTrig[cos[c + d*x]^m*(a*cos[c + d*x] + b*sin[c + d*x])^n, x], x] /; FreeQ[{a, b, c, d}, x] &&
 IntegerQ[m] && IGtQ[n, 0]

Rule 3767

Int[csc[(c_.) + (d_.)*(x_)]^(n_), x_Symbol] :> -Dist[d^(-1), Subst[Int[ExpandIntegrand[(1 + x^2)^(n/2 - 1), x]
, x], x, Cot[c + d*x]], x] /; FreeQ[{c, d}, x] && IGtQ[n/2, 0]

Rule 2606

Int[((a_.)*sec[(e_.) + (f_.)*(x_)])^(m_.)*((b_.)*tan[(e_.) + (f_.)*(x_)])^(n_.), x_Symbol] :> Dist[a/f, Subst[
Int[(a*x)^(m - 1)*(-1 + x^2)^((n - 1)/2), x], x, Sec[e + f*x]], x] /; FreeQ[{a, e, f, m}, x] && IntegerQ[(n -
1)/2] &&  !(IntegerQ[m/2] && LtQ[0, m, n + 1])

Rule 30

Int[(x_)^(m_.), x_Symbol] :> Simp[x^(m + 1)/(m + 1), x] /; FreeQ[m, x] && NeQ[m, -1]

Rubi steps

\begin{align*} \int \frac{\sec ^5(c+d x)}{a \cos (c+d x)+i a \sin (c+d x)} \, dx &=-\frac{i \int \sec ^5(c+d x) (i a \cos (c+d x)+a \sin (c+d x)) \, dx}{a^2}\\ &=-\frac{i \int \left (i a \sec ^4(c+d x)+a \sec ^4(c+d x) \tan (c+d x)\right ) \, dx}{a^2}\\ &=-\frac{i \int \sec ^4(c+d x) \tan (c+d x) \, dx}{a}+\frac{\int \sec ^4(c+d x) \, dx}{a}\\ &=-\frac{i \operatorname{Subst}\left (\int x^3 \, dx,x,\sec (c+d x)\right )}{a d}-\frac{\operatorname{Subst}\left (\int \left (1+x^2\right ) \, dx,x,-\tan (c+d x)\right )}{a d}\\ &=-\frac{i \sec ^4(c+d x)}{4 a d}+\frac{\tan (c+d x)}{a d}+\frac{\tan ^3(c+d x)}{3 a d}\\ \end{align*}

Mathematica [A]  time = 0.272148, size = 53, normalized size = 1.02 \[ -\frac{i \sec ^4(c+d x) (i \sec (c) (4 \sin (c+2 d x)+\sin (3 c+4 d x))-3 i \tan (c)+3)}{12 a d} \]

Antiderivative was successfully verified.

[In]

Integrate[Sec[c + d*x]^5/(a*Cos[c + d*x] + I*a*Sin[c + d*x]),x]

[Out]

((-I/12)*Sec[c + d*x]^4*(3 + I*Sec[c]*(4*Sin[c + 2*d*x] + Sin[3*c + 4*d*x]) - (3*I)*Tan[c]))/(a*d)

________________________________________________________________________________________

Maple [A]  time = 0.148, size = 47, normalized size = 0.9 \begin{align*}{\frac{1}{ad} \left ( \tan \left ( dx+c \right ) -{\frac{i}{4}} \left ( \tan \left ( dx+c \right ) \right ) ^{4}+{\frac{ \left ( \tan \left ( dx+c \right ) \right ) ^{3}}{3}}-{\frac{i}{2}} \left ( \tan \left ( dx+c \right ) \right ) ^{2} \right ) } \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(sec(d*x+c)^5/(a*cos(d*x+c)+I*a*sin(d*x+c)),x)

[Out]

1/d/a*(tan(d*x+c)-1/4*I*tan(d*x+c)^4+1/3*tan(d*x+c)^3-1/2*I*tan(d*x+c)^2)

________________________________________________________________________________________

Maxima [B]  time = 1.21298, size = 285, normalized size = 5.48 \begin{align*} \frac{2 \,{\left (\frac{3 \, \sin \left (d x + c\right )}{\cos \left (d x + c\right ) + 1} - \frac{3 i \, \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} - \frac{5 \, \sin \left (d x + c\right )^{3}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{3}} + \frac{5 \, \sin \left (d x + c\right )^{5}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{5}} - \frac{3 i \, \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} - \frac{3 \, \sin \left (d x + c\right )^{7}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{7}}\right )}}{3 \,{\left (a - \frac{4 \, a \sin \left (d x + c\right )^{2}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{2}} + \frac{6 \, a \sin \left (d x + c\right )^{4}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{4}} - \frac{4 \, a \sin \left (d x + c\right )^{6}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{6}} + \frac{a \sin \left (d x + c\right )^{8}}{{\left (\cos \left (d x + c\right ) + 1\right )}^{8}}\right )} d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5/(a*cos(d*x+c)+I*a*sin(d*x+c)),x, algorithm="maxima")

[Out]

2/3*(3*sin(d*x + c)/(cos(d*x + c) + 1) - 3*I*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 - 5*sin(d*x + c)^3/(cos(d*x +
 c) + 1)^3 + 5*sin(d*x + c)^5/(cos(d*x + c) + 1)^5 - 3*I*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 - 3*sin(d*x + c)^
7/(cos(d*x + c) + 1)^7)/((a - 4*a*sin(d*x + c)^2/(cos(d*x + c) + 1)^2 + 6*a*sin(d*x + c)^4/(cos(d*x + c) + 1)^
4 - 4*a*sin(d*x + c)^6/(cos(d*x + c) + 1)^6 + a*sin(d*x + c)^8/(cos(d*x + c) + 1)^8)*d)

________________________________________________________________________________________

Fricas [A]  time = 0.451651, size = 208, normalized size = 4. \begin{align*} \frac{16 i \, e^{\left (2 i \, d x + 2 i \, c\right )} + 4 i}{3 \,{\left (a d e^{\left (8 i \, d x + 8 i \, c\right )} + 4 \, a d e^{\left (6 i \, d x + 6 i \, c\right )} + 6 \, a d e^{\left (4 i \, d x + 4 i \, c\right )} + 4 \, a d e^{\left (2 i \, d x + 2 i \, c\right )} + a d\right )}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5/(a*cos(d*x+c)+I*a*sin(d*x+c)),x, algorithm="fricas")

[Out]

1/3*(16*I*e^(2*I*d*x + 2*I*c) + 4*I)/(a*d*e^(8*I*d*x + 8*I*c) + 4*a*d*e^(6*I*d*x + 6*I*c) + 6*a*d*e^(4*I*d*x +
 4*I*c) + 4*a*d*e^(2*I*d*x + 2*I*c) + a*d)

________________________________________________________________________________________

Sympy [F(-2)]  time = 0., size = 0, normalized size = 0. \begin{align*} \text{Exception raised: AttributeError} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)**5/(a*cos(d*x+c)+I*a*sin(d*x+c)),x)

[Out]

Exception raised: AttributeError

________________________________________________________________________________________

Giac [A]  time = 1.17927, size = 63, normalized size = 1.21 \begin{align*} -\frac{3 i \, \tan \left (d x + c\right )^{4} - 4 \, \tan \left (d x + c\right )^{3} + 6 i \, \tan \left (d x + c\right )^{2} - 12 \, \tan \left (d x + c\right )}{12 \, a d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(sec(d*x+c)^5/(a*cos(d*x+c)+I*a*sin(d*x+c)),x, algorithm="giac")

[Out]

-1/12*(3*I*tan(d*x + c)^4 - 4*tan(d*x + c)^3 + 6*I*tan(d*x + c)^2 - 12*tan(d*x + c))/(a*d)